let base_url = "http://39.106.131.76:4000"
let $request = function(url, data = {}, method = 'get') {
	return new Promise((resolve, reject) => {
			uni.request({
					url,
					data
				},
				method,
				success(res) {
					resolve(res)
				},
				fail(err) {
					reject(err)
				}
			})
	})
}
uni.$base_url = base_url
uni.$request = $request
uni.$get=function(url,data){
  return $request(url,data)

}
uni.$post=function(url,data){
  return $request(url,data,"POST");
}
uni.$delte=function(url,data){
	return $request(url,data,"DELETE");
}
uni.$put=function(url,data){
	return $request(url,data,"PUT");
}